﻿namespace QueryBuilder.Core.Query
{
    /// <summary>
    /// 
    /// </summary>
    public class Variable : Constraint
    {
        /// <summary>
        /// 
        /// </summary>
        private System.Type type;

        /// <summary>
        /// Initializes a new instance of the <see cref="Variable"/> class.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <param name="type">The type.</param>
        public Variable(string value, System.Type type)
        {
            this.Value = value;
            this.Type = type;
        }

        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        /// <value>The type.</value>
        public System.Type Type
        {
            get { return this.type; }
            private set { this.type = value; }
        }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        public string Value { get; set; }

        /// <summary>
        /// Accepts the specified constraint presenter.
        /// </summary>
        /// <param name="constraintPresenter">The constraint presenter.</param>
        public override void Accept(IConstraintPresenter constraintPresenter)
        {
            constraintPresenter.Present(this);
        }
    }
}